{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "98c7801e-80c7-4fae-88f9-0c4de5ea0809",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import sympy as sp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f7372cce-9eeb-42fb-8383-57ef6c4de4b7",
   "metadata": {},
   "outputs": [],
   "source": [
    "class OBVP:\n",
    "    def __init__(self):\n",
    "        self.p = sp.Function('p')\n",
    "        self.v = sp.Function('v')\n",
    "        self.a = sp.Function('a')\n",
    "        self.t = sp.var('t')\n",
    "        \n",
    "    def calcu_costate(self):\n",
    "        λ1 = sp.Function('λ1')(self.t)\n",
    "        λ2 = sp.Function('λ2')(self.t)\n",
    "        λ = sp.Function('λ')(self.t)\n",
    "        eq = sp.Eq(λ, sp.Matrix([λ1, λ2]))\n",
    "        display(eq)\n",
    "        \n",
    "        return \n",
    "    def system_eq(self):\n",
    "        se = sp.Eq(sp.Matrix([sp.diff(self.p(self.t), (self.t, 1)), sp.diff(self.v(self.t), (self.t, 1))]),\n",
    "                   sp.Matrix([self.v(self.t), self.a(self.t)]))\n",
    "        # sp.init_printing(use_unicode=True, wrap_line=False, pretty_print=False)\n",
    "        # sp.print_latex(se)\n",
    "        display(se)\n",
    "        return se\n",
    "    def calcu_Hamiltonian(self):\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "6d422e9b-7b99-46b0-900d-e4a215ae5b2b",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "solver = OBVP()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1263cb57-cef5-45b9-8186-239a622c832f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "base"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
